package com.class05.controller;


import com.class05.domain.Student;
import com.class05.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class StudentController {

    @Autowired
    private StudentService studentService;


    public void insertStudent(Student student){
        studentService.insertStudent(student);

    }
    public Student getStudentById(Integer id){
        Student student =  studentService.queryById(id);
        return student;
    }
}
